﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace TPCN.DAL
{
   public class SoDuDauKiObj
    {
        private string _SoduID;

        public string SoduID
        {
            get { return _SoduID; }
            set { _SoduID = value; }
        }
        private string _HangID;

        public string HangID
        {
            get { return _HangID; }
            set { _HangID = value; }
        }
        private string _Ngaytinh;

        public string Ngaytinh
        {
            get { return _Ngaytinh; }
            set { _Ngaytinh = value; }
        }
        private string _Soluongton;

        public string Soluongton
        {
            get { return _Soluongton; }
            set { _Soluongton = value; }
        }
        private string _Dongianhap;

        public string Dongianhap
        {
            get { return _Dongianhap; }
            set { _Dongianhap = value; }
        }
        public SoDuDauKiObj SetValuesFromDataReader(IDataReader reader)
        {
            SoDuDauKiObj obj = new SoDuDauKiObj();
            obj.SoduID = (reader["SoduID"] is DBNull) ? String.Empty : reader["SoduID"].ToString();
            obj.HangID = (reader["HangID"] is DBNull) ? String.Empty : reader["HangID"].ToString();
            obj.Ngaytinh = (reader["Ngaytinh"] is DBNull) ? String.Empty : reader["Ngaytinh"].ToString();
            obj.Soluongton = (reader["Soluongton"] is DBNull) ? "0" : reader["Soluongton"].ToString();
            obj.Dongianhap = (reader["Dongianhap"] is DBNull) ? "0" : reader["Dongianhap"].ToString();
            return obj;
        }
    }
}
